<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="template/default/admin/css/validationEngine.jquery.css" type="text/css"/>
<link rel="stylesheet" href="template/default/admin/css/login.css" type="text/css"/>
<!--多语言头部开始-->
<!--{subtemplate common/header_lang}-->
<!--多语言头部结束-->
<title>{$title}</title>
</head>
<body>		
	<div id="header"></div>
	<!-- content -->
	<div id="content">
		<div class="layout_login">
		    <!-- all code between noparse tags is not compiled -->
		    <div class="hm_tt">
		        <form id="form_login" name="form_login_pass" class="formular" method="post" action="index.php?mod=ajax&action=member&do=ajax_login">
		        <fieldset>
		            <legend>
		                {lang admin_login_1}
		            </legend>
		            <label>
		                <span>{lang username}</span>
		                <input value="" class="validate[required,maxSize[64]] text-input" type="text" name="username" id="username" />
		            </label>
		            <label>
		                <span>{lang password}</span>
		                <input value="" class="validate[maxSize[64]] text-input" type="password" name="password" id="password" />
		            </label>
		        </fieldset>
		        <input class="submit" type="submit" value="{lang submit}"/><hr />
		    </form>
		    </div>
		</div>
	</div>
	<div id="footer"></div>
	<script src="template/default/admin/js/jquery.min.js" type="text/javascript"></script>
	<script src="source/language/{SITE_LANG}/lang_jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
        <script src="template/default/admin/js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
	<script>
            
		// This method is called right before the ajax form validation request
		// it is typically used to setup some visuals ("Please wait...");
		// you may return a false to stop the request 
		function beforeCall(form, options){
			if (window.console) 
			console.log("Right before the AJAX form validation call");
			return true;
		}
            
		// Called once the server replies to the ajax form validation request
		function ajaxValidationCallback(status, form, json, options){
			if (window.console) 
			console.log(status);
                
			if (status === true) {
				// uncomment these lines to submit the form to form.action
				// form.validationEngine('detach');
				document.form_login_pass.action='admin.php';
				document.form_login_pass.submit();
				//form.submit();
				// or you may use AJAX again to submit the data .
			}
		}
            
		jQuery(document).ready(function(){
			jQuery("#form_login").validationEngine({
				ajaxFormValidation: true,
				ajaxFormValidationMethod: 'post',
				onAjaxFormComplete: ajaxValidationCallback
			});
		});
	</script>
</body>
</html>
